/* 搜索和筛选区域样式优化 */
.search-filter-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(145deg, rgba(31, 41, 55, 0.6), rgba(15, 23, 42, 0.8));
    border-radius: 1rem;
    border: 1px solid rgba(127, 127, 127, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

@media (min-width: 640px) {
    .search-filter-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* 下拉筛选框美化 - 核心优化部分 */
.filter-dropdown {
    width: 100%;
    max-width: 220px;
    position: relative;
    /* 添加下拉框容器的微妙阴影 */
    filter: drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06));
}

.filter-select {
    width: 100%;
    padding: 0.875rem 2.5rem 0.875rem 1.25rem;
    background: linear-gradient(145deg, rgba(31, 41, 55, 0.8), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(127, 127, 127, 0.15);
    border-radius: 0.75rem;
    color: #f1f5f9;
    font-size: 0.9375rem;
    font-weight: 500;
    appearance: none;
    /* 美化下拉箭头图标 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.875rem center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* 添加内阴影增强深度感 */
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 聚焦状态美化 */
.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.2),
    inset 0 1px 2px rgba(0, 0, 0, 0.1);
    background-color: rgba(31, 41, 55, 0.9);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    /* 聚焦时轻微放大 */
    transform: scale(1.02);
}

/* 悬停状态美化 */
.filter-select:hover {
    border-color: rgba(59, 130, 246, 0.5);
    background-color: rgba(31, 41, 55, 0.9);
}

/* 下拉选项样式美化 */
.filter-select option {
    background: #1e293b;
    color: #f1f5f9;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    border-bottom: 1px solid rgba(127, 127, 127, 0.1);
    transition: background 0.2s ease;
}

/* 选项悬停效果 */
.filter-select option:hover {
    background: rgba(59, 130, 246, 0.1);
}

/* 选中选项样式 */
.filter-select option:checked {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    font-weight: 500;
}

/* 禁用状态样式 */
.filter-select:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 下拉框打开时的动画效果 */
.filter-select:focus-within {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* 搜索框样式保持不变 */
.search-box {
    flex: 1;
    position: relative;
    max-width: 600px;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.5rem;
    background: rgba(31, 41, 55, 0.6);
    border: 1px solid rgba(127, 127, 127, 0.15);
    border-radius: 0.75rem;
    color: #f1f5f9;
    font-size: 0.9375rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.2);
    background: rgba(31, 41, 55, 0.8);
}

.search-input::placeholder {
    color: #94a3b8;
    transition: color 0.3s ease;
}

.search-input:focus::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

.search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    transition: all 0.3s ease;
}

.search-box:focus-within .search-icon {
    color: #3b82f6;
    transform: translateY(-50%) scale(1.1);
}

.clear-search {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.8;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.clear-search:hover {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-50%) rotate(90deg);
    opacity: 1;
}

/* 结果统计样式 */
.results-count {
    color: #94a3b8;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: rgba(31, 41, 55, 0.3);
    display: inline-block;
    transition: all 0.3s ease;
}

.results-count:hover {
    background: rgba(31, 41, 55, 0.5);
}

.count-highlight {
    color: #3b82f6;
    font-weight: 600;
    position: relative;
    padding: 0 0.25rem;
}

.count-highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(59, 130, 246, 0.3);
    border-radius: 1px;
}

/* 其他原有样式保持不变 */
.favorites-container {
    padding: 1rem;
}

.section-header {
    margin-bottom: 1.5rem;
    position: relative;
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #f1f5f9, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-header p {
    color: #94a3b8;
    max-width: 700px;
}

.favorites-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .favorites-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .favorites-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.favorite-card {
    background: linear-gradient(145deg, rgba(31, 41, 55, 0.4), rgba(15, 23, 42, 0.6));
    border-radius: 1rem;
    border: 1px solid rgba(127, 127, 127, 0.1);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.favorite-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: rgba(22, 93, 255, 0.2);
}

.favorite-category {
    align-self: flex-start;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(22, 93, 255, 0.05);
    color: #60a5fa;
    margin-bottom: -0.5rem;
    z-index: 1;
}

.favorite-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(22, 93, 255, 0.1);
    color: #3b82f6;
    transition: all 0.3s ease;
}

.favorite-card:hover .favorite-icon {
    transform: scale(1.15) rotate(5deg);
}

.favorite-info {
    flex: 1;
}

.favorite-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #f1f5f9;
    transition: color 0.3s ease;
}

.favorite-card:hover .favorite-title {
    color: #3b82f6;
}

.favorite-desc {
    color: #94a3b8;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.favorite-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.favorite-date {
    color: #94a3b8;
    font-size: 0.8125rem;
    transition: color 0.3s ease;
}

.favorite-card:hover .favorite-date {
    color: #f1f5f9;
}

.view-diagram-btn {
    padding: 0.5rem 1rem;
    background: rgba(22, 93, 255, 0.1);
    color: #3b82f6;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.view-diagram-btn:hover {
    background: rgba(22, 93, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 93, 255, 0.1);
}

.empty-favorites {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
    text-align: center;
}

.empty-icon {
    font-size: 3rem;
    color: rgba(22, 93, 255, 0.2);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.empty-favorites:hover .empty-icon {
    transform: scale(1.1) rotate(5deg);
    color: rgba(22, 93, 255, 0.3);
}

.empty-favorites p {
    color: #94a3b8;
    margin-bottom: 1.5rem;
    max-width: 500px;
}

.explore-btn {
    padding: 0.75rem 1.5rem;
    background: #3b82f6;
    color: white;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(22, 93, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.explore-btn:hover {
    background: rgba(22, 93, 255, 0.9);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(22, 93, 255, 0.4);
}
